package com.lc.tgxm.model;


import com.lc.tgxm.util.Log;
import com.zcx.helper.adapter.AppRecyclerAdapter;

import java.util.ArrayList;
import java.util.Random;

/**
 * 主页面列表实体类
 * Created by Lei on 2018/1/4.
 */
public class HomeListmodel extends AppRecyclerAdapter.Item {
    public String id;
    public String picurl;
    public String title;
    public String source;
    public String eye;
    public int rHeight;// 随机高度

    public static HomeListmodel testData() {
        int rnint = new Random().nextInt(50);
        Log.i("HomeListmodel", "rnint", rnint);

        HomeListmodel hm = new HomeListmodel();
        hm.title = "兰博基尼 2012款 1.5L 手动豪华型";
        hm.source = "2017新款";
        hm.eye = "自动挡";
        hm.picurl = "http://img.cheshi-img.com/chezhan/0/2010/0919/4c95d8d4e271b.jpg";
        hm.span = 1;
        hm.rHeight = 230 + rnint;
        return hm;
    }

    public static ArrayList<HomeListmodel> testData(int size) {
        ArrayList<HomeListmodel> arrayList = new ArrayList<>();
        for (int i = 0; i < size; i++) {
            arrayList.add(testData());
        }
        return arrayList;
    }

}